From 3c0ebf65cf89140825a3f8c4c4e65170f8df4e8a Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 2 Jun 2014 18:04:36 +0200 Subject: [PATCH] window: Only check for the event widget if clicked on the "content" region Every button press/release event reaching the the multipress gesture in GtkWindow and happening in the "title" region must be handled, regardless of the event widget. Children there wanting the event(s) for themselves are (and were always) expected to stop event propagation. So the only place to check for the event widget's "window-dragging" style property is the "content" region, which matches the pre-gestures behavior. This fixes some issues with sequences being mistakenly claimed (and events not propagated further) on situations it shouldn't. --- gtk/gtkwindow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 604fecef13..06c7592633 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1435,15 +1435,15 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture, if (event_widget != widget) gtk_widget_style_get (event_widget, "window-dragging", &window_drag, NULL); - /* fall thru */ - case GTK_WINDOW_REGION_TITLE: - if (!window_drag && event_widget != widget) + + if (!window_drag) { gtk_gesture_set_sequence_state (GTK_GESTURE (gesture), sequence, GTK_EVENT_SEQUENCE_DENIED); return; } - + /* fall thru */ + case GTK_WINDOW_REGION_TITLE: if (n_press == 2) _gtk_window_toggle_maximized (window); /* fall thru */ -- 2.30.2